home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 November
/
CPNL0711.ISO
/
boekhoud
/
finan
/
BADGER finance v1.0 beta 2.exe
/
xampplite
/
phpMyAdmin
/
lang
/
remove_message.sh
< prev
next >
Wrap
Linux/UNIX/POSIX Shell Script
|
2003-11-18
|
545b
|
24 lines
#!/bin/bash
# $Id: remove_message.sh,v 2.0 2003/11/18 15:20:39 nijel Exp $
#
# Shell script that removes a message from all message files (Lem9)
# it checks for the message, followed by a space
#
# Example: remove_message.sh 'strMessageToRemove'
#
if [ $# -ne 1 ] ; then
echo "usage: remove_message.sh 'strMessageToRemove'"
exit 1
fi
for file in *.inc.php
do
echo "lines before:" `wc -l $file`
grep -v "$1 " ${file} > ${file}.new
rm $file
mv ${file}.new $file
echo " lines after:" `wc -l $file`
done
echo " "